function [output_seq, PSBCH_FFT_Template] = Function_Create_PSBCH_Subframe (NSLsymb, NFFT, cpLen0, cpLenR, NSLRB, l_PSBCH, l_PSBCH_DMRS, NSLID, PSBCH_Sync_Grid)
	Msc_PSBCH = 72;                     % bandwidth of PSBCH in number of subcarriers
    NRBsc = 12;                         % Resource block size in the frequency domain, expressed as a number of subcarriers
    N_PRB = Msc_PSBCH / NRBsc;
    
	Hopping = 'Off';            % Hopping method ('Off', 'Group', 'Sequence')
    NCS = 0;
    
    % PSBCH subcarrier resources: central 72 subcarriers are allocated
    subixs_PSBCH = (0:1:Msc_PSBCH-1)' - Msc_PSBCH/2 +  NRBsc*NSLRB/2;
    
    %\\\\\\\\ use stored PSBCH signal \\\\\\\\\%
    load PSBCH_Output.mat
    
	% map to grid
	psbch_grid = Function_Phy_Resources_Mapper(2*NSLsymb,NSLRB*NRBsc, l_PSBCH, subixs_PSBCH, psbch_output);
    
    Mode = 'psbch_V2X';
	[PSBCH_DMRS_Seq, DRSSymInfo] = Function_Generate_DMRS_Seq(N_PRB,  NSLID, NCS, Mode, Hopping);
	PSBCH_DRMS_Seq_Grid = Function_Phy_Resources_Mapper(2*NSLsymb, NSLRB*NRBsc, l_PSBCH_DMRS, subixs_PSBCH, PSBCH_DMRS_Seq);
    
    
	% add pre-calculated base grid (DMRS and SSS if provided)        
	tx_output_grid = psbch_grid + PSBCH_DRMS_Seq_Grid + PSBCH_Sync_Grid;
	% a visual representation of PSBCH grid : uncomment the following line
	% visual_subframeGridGraphic(tx_output_grid);
	% time-domain transformation: in standard-compliant sidelink
	% waveforms the last symbol shoul be zeroed. This is not done here.
    output_seq = Function_Phy_OFDM_Modulate_per_Subframe(NSLsymb, NFFT, cpLen0, cpLenR, NRBsc, NSLRB, tx_output_grid);


    PSBCH_Length = length(subixs_PSBCH);
    
    PSBCH_FFT_Template = zeros(NFFT,1);
    
    for n = 1:PSBCH_Length
       PSBCH_FFT_Template((NFFT-NSLRB*NRBsc)/2+1+subixs_PSBCH(n)) = 1;
    end
    PSBCH_FFT_Template = ifftshift(PSBCH_FFT_Template);
    
end % CreateSubframe